package com.ll.beautymall.base;

import android.view.View;
import android.view.ViewGroup;

import java.util.List;

/**
 * Created by Administrator on 2016/10/22.
 */
public class MyBaseAdapter<D, T extends BaseViewHolder> extends android.widget.BaseAdapter {
    private List<D> mData;

    public MyBaseAdapter() {

    }

    public void setData(List<D> data) {
        mData = data;
        notifyDataSetChanged();
    }

    @Override
    public int getCount() {
        return mData != null ? mData.size() : 0;
    }

    @Override
    public Object getItem(int i) {
        return mData != null ? mData.get(i) : null;
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        return null;
    }
}
